package com.ym9527.controller;


import com.ym9527.entity.Label;
import com.ym9527.jpa.LabelJpa;
import com.ym9527.utils.R;
import jdk.nashorn.internal.ir.Labels;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 这是标签相关的控制器类
 */
@RestController
@RequestMapping("label")
public class LabelController {

    @Resource
    LabelJpa labelJpa;


    @PostMapping("/getall")
    public R getAll(){

         List<Label> lists=labelJpa.findAll();

         return R.ok(lists);
         }

}
